Flatpak

Installing OpenCPN with Flatpak

The opencpn flatpak build is targeting Linux users on distros includiing (but not limited to) Fedora, Arch, SuSE and non-LTS Ubuntu releases. It is also the the supported way to install OpenCPN on RPi-4 and other high-end aarch64 system.

To install the Flatpak version of OpenCPN, first install flatpak as described in https://flatpak.org/setup/.

Then, install OpenCPN:

$ flatpak install --user \
    https://dl.flathub.org/repo/appstream/org.opencpn.OpenCPN.flatpakref

The initial installation is possibly huge, around 450Mb, This is a one-time setup download, later updates weighs in at about 50 Mb or less. Updates can be retrieved using

flatpak update org.opencpn.OpenCPN

The flatpak installation is integrated in the desktop. Using for example gnome the flatpak'ed opencpn can be started like any other application. It can also be started from the command line using:

$ flatpak run org.opencpn.OpenCPN

Testing installation

To check if the installation has succeeded you can try flatpak list as user (without sudo) to get the information below:

 $ flatpak list
Name                 Application ID                        Version         Branch Origin         Installation
Freedesktop Platform org.freedesktop.Platform              18.08.39        18.08  flathub        system
Intel                org.freedesktop.Platform.VAAPI.Intel                  18.08  flathub        system
html5-codecs         org.freedesktop.Platform.html5-codecs                 18.08  flathub        system
Freedesktop SDK      org.freedesktop.Sdk                   18.08.39        18.08  flathub        system
OpenCPN              org.opencpn.OpenCPN                   5.2.0-0 4d956e1 test   opencpn-origin user

The configuration files which are otherwise found at ~/.opencpn are now moved to

 ~/.var/app/org.opencpn.OpenCPN/config/opencpn

This means that plugins will be installed here, but also that for example opencpn.log and opencpn.conf lives here.

The regular OpenCPN (installed with apt) and flatpak OpenCPN can be used side by side, the configurations are independent of each other.

Updating OpenCPN

To update the system to the latest version:

$ flatpak update org.opencpn.OpenCPN

The installed plugins and configuration are not affected by an uninstall and reinstall.

Configuring the USB dongle

If the USB dongle is not found try:

Troubleshooting USB dongle

Access to the directories from flatpak

Out of the box, the Flatpak package can access files in the home directory. As long as charts are installed here no actions needs to be taken. However, if charts needs to be stored outside of $HOME (for exampe on an USB stick) flatpak must be given access to the used directories using something like

  $ sudo flatpak override org.opencpn.OpenCPN  --filesystem=/usr/local/charts

More information: https://docs.flatpak.org/en/latest/sandbox-permissions.html

Background

Background Q&A